package com.example.mypositioning
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import android.widget.Button
import android.widget.TextView


class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)


        var permissionUtils=PermissionUtils()
        //permissionUtils.verifyStoragePermissions(this)
        //permissionUtils.verifyPositionPermissions(this)


        var baiduPositioning= BaiduPositioning()
        baiduPositioning.AgreePrivacy(true)
        baiduPositioning.init(applicationContext)
        var textView1=findViewById<TextView>(R.id.textview)
        baiduPositioning.setTextviewtxt(textView1)

        var button=findViewById<Button>(R.id.button)
        button.setOnClickListener {

            textView1.text="null"
            //权限
            permissionUtils.verifyStoragePermissions(this)
            permissionUtils.verifyPositionPermissions(this)
            baiduPositioning.start()

        }

    }

}


